package com.ds.lens.data.common.constant;

import lombok.Getter;

/**
 * @author WeiShaoying
 * @date 2019/11/25 下午2:20
 */
public enum ChannelEnum {
    ON_DUTY(1),MAIL(2),WEIXIN(3),SMS(4);
    @Getter
    int value;

    ChannelEnum(int value) {
        this.value = value;
    }

    public static ChannelEnum valueOf(Integer value) {
        if (value == null) {
            return null;
        }
        for (ChannelEnum channelEnum : ChannelEnum.values()) {
            if (channelEnum.value == value) {
                return channelEnum;
            }
        }
        return null;
    }
}
